package com.excel.sys.controller;

import com.excel.sys.service.ImportExcelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

@Controller
@RequestMapping("import")
public class ImportExcelController {

    @Autowired
    ImportExcelService service;

    @PostMapping("excel")
    @ResponseBody
    public Map<String,Object> importExcel(MultipartFile file){
        Map<String,Object> res = service.importExcel(file);
        return res;
    }

}
